home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacApp Release 10 / MacApp Release 10 - HD Ready / Tools / UStringHandle.h < prev   
Encoding:
Text File  |  1996-04-03  |  1.4 KB  |  59 lines  |  [TEXT/MPS ]

  1. // UStringHandle.h
  2. // Copyright © 1985-96 by Apple Computer, Inc. All rights reserved.
  3.  
  4. #ifndef __USTRINGHANDLE__
  5. #define __USTRINGHANDLE__
  6.  
  7. #ifndef __UOBJECT__
  8. #include "UObject.h"
  9. #endif
  10.  
  11. #ifndef __UDYNAMICARRAY__
  12. #include "UDynamicArray.h"
  13. #endif
  14.  
  15. #ifndef __FILE__
  16. #include <file.h>
  17. #endif
  18.  
  19.  
  20. //========================================================================================
  21. // CLASS TStringHandle
  22. //========================================================================================
  23.  
  24. class TStringHandle : public TObject
  25. {
  26.     MA_DECLARE_CLASS;
  27.     
  28.     public:
  29.         TStringHandle();    // constructor
  30.         
  31.         virtual ~TStringHandle(); // override
  32.         
  33.         void IStringHandle();
  34.         
  35.         void WriteToFile(FILE* theFile);
  36.         
  37.         void Catenate(const CStr255& theString);
  38.         
  39.         void CatenateToFront(const CStr255& theString);
  40.         
  41.         void AsStr255(CStr255& theString);
  42.  
  43.         CStr255 AsStr255();
  44.  
  45.     //----------------------------------------------------------------------------------------
  46.     // data members 
  47.     //----------------------------------------------------------------------------------------
  48.     protected:
  49.         TDynamicArray* fText;
  50. };
  51.  
  52. //----------------------------------------------------------------------------------------
  53. // NewTStringHandle: 
  54. //----------------------------------------------------------------------------------------
  55.  
  56. extern TStringHandle* NewTStringHandle();
  57.  
  58. #endif // __USTRINGHANDLE__
  59.